﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace SinsenWeb.Views
{
    public class ViewPageBase<T> : ViewPage<T> where T : class
    {
        public string H(string input)
        {
            return Html.Encode(input);
        }
        public string H(DateTime? date)
        {
            if(date.HasValue)
            {
                return date.Value.ToString("dd.MM.yyyy");
            }
            return "?";
        }

        public T Model
        {
            get { return ViewData.Model; }
        }

    }

    public class ViewPageBase : ViewPage
    {
        public string H(string input)
        {
            return Html.Encode(input);
        }
    }
}
